<?php
	
	$username = $_SESSION['user']->username;
	
	require_once('magpierss/rss_fetch.inc');
	$url = $_GET['url'];
	if (!isset($vars['entity']->nb)) {
		$num_items = 6;
	}
	else {
		$num_items = $vars['entity']->nb;
	}
	$rss = fetch_rss( 'http://www.e-campus.uvsq.fr/claroline/scuttle/rss/'.$username );
	echo "<p><b>" . $rss->channel['title'] . "</b></p>"; /* this line styles the title of the feed */
	foreach (array_slice($rss->items, 0, $num_items) as $item) {
			$href = htmlentities($item['link']);
			$title = htmlentities($item['title']);
			$description = htmlentities($item['description']);
		echo "<b><a href=$href target='_new'>$title</a></b><br>$description<br>"; /* this line styles how the feed description appears */
	}
	echo '<br/>';

	echo '<p><a target="_blank" href="http://www.e-campus.uvsq.fr/claroline/scuttle/bookmarks/'.$username.'?action=add">Ajouter des liens dans mon Passe-Liens</a></p>';
 ?>
